﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

using G.Runtime;

namespace Conquest
{
    public partial class LaunchingArea : UserControl
    {
        public delegate void LaunchingAreaHandler(LaunchingArea area);
        public event LaunchingAreaHandler DeployingChanged;
        
        private bool _Deploying;
        
        public LaunchingArea()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            
        }
        
        public ProgressBar ProgressBar
        {
            get { return this.progressBar1; }
        }
        
        public bool Deploying
        {
            get { return _Deploying; }
            set 
            {
                if (_Deploying != value)
                {
                    _Deploying = value;
                    FireDeploying();
                }
            }
        }
        
        private void FireDeploying()
        {
            if (DeployingChanged != null)
            {
                DeployingChanged(this);
            }
        }
        
        public Conquest.Homeland Land1
        {
            get { return this.playerPad1.Homeland; }
        }
        
        public Conquest.Homeland Land2
        {
            get { return this.playerPad2.Homeland; }
        }
        
        public Conquest.PlayerPad PlayerPad1
        {
            get { return this.playerPad1; }
        }
        
        public Conquest.PlayerPad PlayerPad2
        {
            get { return this.playerPad2; }
        }
        
    }
}
